<?php
namespace app\model;
use app\BaseModel;
use think\model\concern\SoftDelete;

class Collect extends BaseModel
{

    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = '0000-00-00 00:00:00';
    protected $hidden = ['update_time','delete_time','sort','status'];


    protected function setViewIdAttr($value, $data)
    {
        $title = ("\app\model\\".$data['controller'])::where('id',$data['view_id'])->value('title');
        $this->set('title',$title);
        return $value;
    }







}